﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
//using Logger = Garlic.CC.Utility.Logger;
using Garlic.DAL;
using Garlic.Infrustructure;
using DAL.BusinessDeal;

namespace Garlic.BLL.BusinessDeal
{
   public class StSpProcessCTNAmountManager
    {
       private StSpProcessCTNAmountDAL DAL = new StSpProcessCTNAmountDAL();

       public string InsertUpdateToTable(int P_Operation_Type, string P_VOY_ID, string P_CSZ_CSIZECD,
           string P_STS_CSTATUSCD, string P_DNGFG, string P_OVLMTCD, string P_RFFG, string P_AMOUNT, string P_USER_ID
            , string P_EFFG, string P_VAT_ID ,string P_SCD_ID)
       {
           try
           {
               return DAL.InsertUpdateProcessCTNAmount(P_Operation_Type, P_VOY_ID, P_CSZ_CSIZECD, P_STS_CSTATUSCD, P_DNGFG,
                      P_OVLMTCD, P_RFFG, P_AMOUNT, P_USER_ID, P_EFFG, P_VAT_ID, P_SCD_ID);
           }
           catch (Exception e)
           {
               Logger.Instance.Error(this, "写入数据出错", e);
               throw;
           }
       }

       /// <summary>
       /// 得到航次箱量
       /// </summary>
       /// <param name="textWhere">where va.vat_voy_id=</param>
       /// <param name="OrderText"></param>
       /// <returns></returns>
       public DataTable GetTable(string textWhere, string OrderText)
       {
           try
           {
               return DAL.GetTable(textWhere, OrderText);
           }
           catch (Exception e)
           {
               Logger.Instance.Error(this, "读取数据失败.", e);
               throw;
           }
       }

    }//end class
}
